package com.lubase.metadata.invoke;

import com.lubase.core.extend.IInvokeMethod;
import com.lubase.metadata.service.RelationMapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;

@Component
public class getRelationMapByScene implements IInvokeMethod {
    @Autowired
    RelationMapService relationMapService;

    @Override
    public Object exe(HashMap<String, String> mapParam) throws Exception {
        String sceneId = checkAndGetParam("sceneId", mapParam);
        return relationMapService.getTableRelationMapOfScene(sceneId);
    }

    @Override
    public String getDescription() {
        return "获取ER图：根据业务场景";
    }

    @Override
    public String getId() {
        return "1477007763136581632";
    }
}
